<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model as Model;
use Kalnoy\Nestedset\NodeTrait;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class Selection
 * @package App\Models
 * @version November 13, 2017, 8:35 am UTC
 *
 * @property string name
 * @property string code
 * @property int parent_id
 */
class Selection extends Model
{
    use SoftDeletes, NodeTrait;

    public $table = 'selections';

    public $hidden = [
        '_lft',
        '_rgt'
    ];

    protected $dates = ['deleted_at'];

    public $fillable = [
        'name',
        'parent_id',
        'code',
        'sort',
        'params',
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'name' => 'string'
    ];

    
}
